package com.itheima.reggie.common;

/**
 * 基于ThreadLocal封装工具类，保存数据
 */
public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<Long>();

    public static void setValue(Long id) {
        threadLocal.set(id);
    }

    public static Long getValue() {
        return threadLocal.get();
    }

    private static ThreadLocal<String> threadLocal1 = new ThreadLocal<>();

    public static void setValue1(String url) {
        threadLocal1.set(url);
    }

    public static String getValue1() {
        return threadLocal1.get();
    }
}
